#include <stdio.h>
int main()
{
	float q;
	scanf("%f", &q);
	int n = 0;
	while(q>0)
	{
		while(q > 0)
		{
			n++;
			q -= 1 / (float)(n+1);
		}
		printf("%d card(s)\n", n);
		n=0;
		scanf("%f", &q);
	}
	return 0;
}

